﻿using SK3000RunningTestTool.SKServerEnum;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SK3000RunningTestTool.SKServerSource
{
    public class ServiceTestTypeSource
    {
        public static Dictionary<Enum_ServiceTestType, ServiceTestType> ServiceTestTypeList = new Dictionary<Enum_ServiceTestType, ServiceTestType>();

        public static bool Init()
        {
            bool bolResult = false;
            
            foreach (Enum_ServiceTestType item in Enum.GetValues(typeof(Enum_ServiceTestType)))
            {
                ServiceTestTypeList[item] = new ServiceTestType { TypeID = item };
                ServiceTestTypeList[item].ServiceAddress = "127.0.0.1";
                switch (item)
                {
                    case Enum_ServiceTestType.TCPService:
                        ServiceTestTypeList[item].ServiceTestTypeName = "TCP服务";
                        ServiceTestTypeList[item].ServicePort = 12345;
                        break;
                    case Enum_ServiceTestType.ATUDSerice:
                        ServiceTestTypeList[item].ServiceTestTypeName = "转警服务";
                        ServiceTestTypeList[item].ServicePort = 50000;
                        break;
                    case Enum_ServiceTestType.DeviceService:
                        ServiceTestTypeList[item].ServiceTestTypeName = "设备服务";
                        ServiceTestTypeList[item].ServicePort = 1159;
                        break;
                    case Enum_ServiceTestType.VDTUService:
                        ServiceTestTypeList[item].ServiceTestTypeName = "视频服务";
                        ServiceTestTypeList[item].ServicePort = 6667;
                        break;
                    case Enum_ServiceTestType.VideoRecordService:
                        ServiceTestTypeList[item].ServiceTestTypeName = "视频录像服务";
                        ServiceTestTypeList[item].ServicePort = 9999;
                        break;
                    case Enum_ServiceTestType.WebService:
                        ServiceTestTypeList[item].ServiceTestTypeName = "Web后台服务";
                        ServiceTestTypeList[item].ServicePort = 11300;
                        break;
                    case Enum_ServiceTestType.WebSocket:
                        ServiceTestTypeList[item].ServiceTestTypeName = "WebSocket";
                        ServiceTestTypeList[item].ServicePort = 443;
                        break;
                }
            }
            return bolResult;
        }
    }
}
